// /**
//  * Copyright © 2013-2017 Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

@import 'module/_collapsible_navigation.less';

@message-global-note__color: @text__color;
@message-global-note__background: @color-yellow-light2;
@message-global-note__border-color: @color-yellow-light3;

@message-global-note-link__color: @link__color;
@message-global-note-link__color-hover: @link__hover__color;
@message-global-note-link__color-active: @link__active__color;

@message-global-caution__color: @color-white;
@message-global-caution__background: @color-red9;
@message-global-caution__border-color: none;

@message-global-caution-link__color: @link__color;
@message-global-caution-link__color-hover: @link__hover__color;
@message-global-caution-link__color-active: @link__active__color;

@header__background-color: false;
@header-icons-color: @color-gray56;
@header-icons-color-hover: @color-gray20;

@addto-color: @text__color__muted;
@addto-hover-color: @primary__color;
@minicart-icons-color: @header-icons-color;
@minicart-icons-color-hover: @header-icons-color-hover;

@button__shadow: inset 0 2px 1px rgba(0,0,0,.12);

@h1__margin-bottom__desktop: @indent__xl;

//
//  Footer
//  ---------------------------------------------

@footer__background-color: false;

//
//    Common
//--------------------------------------

& when (@media-common = true) {

body {
    .lib-css(background-color, @page__background-color);
}

//
//    Header
//--------------------------------------
.page-header {
    .lib-css(background-color, @header__background-color);
    border-bottom: 1px solid @border-color__base;
    margin-bottom: @indent__base;
}

.header {
    &.content {
        padding-top: @indent__s;
        position: relative;
        &:extend(.abs-add-clearfix all);
    }
}

.logo {
    position: relative;
    z-index: 5;
    float: left;
    max-width: 50%;
    margin: 0 0 @indent__s @indent__xl;
    img {
        max-height: 50px;
        max-width: 100%;
        display: block;
    }
   .page-print & {
        float: none;
    }
}

.page-main {
    > .page-title-wrapper {
        .page-title + .action {
            margin-top: @indent__l;
        }
    }
}

.action.skip {
    &:not(:focus) {
        &:extend(.abs-visually-hidden all);
    }
    &:focus {
        position: absolute;
        z-index: 15;
        box-sizing: border-box;
        width: 100%;
        left: 0;
        top: 0;
        text-align: center;
        .lib-css(background, @color-gray94);
        .lib-css(padding, @indent__s);
    }
}

//
//  Global notice
//--------------------------------------

.message.global {
    p {
        margin: 0;
    }
    &.noscript,
    &.cookie {
        .lib-message(@_message-type: global-note);
        margin: 0;
    }
    &.cookie {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 3;
        .actions {
            margin-top: @indent__s;
        }
    }
    &.demo {
        .lib-message(@_message-type: global-caution);
        text-align: center;
        margin-bottom: 0;
    }
}

//
//  Footer
//--------------------------------------

.page-footer {
    margin-top: auto;
    .lib-css(background-color, @footer__background-color);
}

.footer {
    &.content {
        padding-top: 25px;
        margin-top: 25px;
        padding-bottom: 25px;
        border-top: 1px solid @border-color__base;
        ul {
            &:extend(.abs-reset-list all);
        }
        .links {
            > li {
                margin: 0 0 8px;
            }
        }
        .switcher-store {
            margin: 0 0 30px;
        }
    }
    .copyright,
    .bugs {
        display: block;
        margin: 20px 0 0;
    }
}

.page-header,
.page-footer {
    .switcher {
        margin-right: 10px;
        .options {
            .lib-dropdown(
                @_dropdown-actions-padding: 0,
                @_dropdown-list-item-padding: 0,
                @_dropdown-toggle-icon-content: @icon-down,
                @_dropdown-toggle-active-icon-content: @icon-up,
                @_icon-font-text-hide: true,
                @_icon-font-size: 22px,
                @_icon-font-line-height: 22px,
                @_dropdown-list-min-width: 160px
            );
            ul.dropdown {
                a {
                    display: block;
                    padding: 8px;
                    &:hover {
                        text-decoration: none;
                    }
                }
            }
        }
        li {
            margin: 0;
            font-size: @font-size__s;
        }
        .label {
            &:extend(.abs-visually-hidden all);
        }
        strong {
            font-weight: @font-weight__regular;
        }
    }
}

//
//    Widgets
//--------------------------------------
.sidebar {
    .widget.block:not(:last-child),
    .widget:not(:last-child) {
        &:extend(.abs-margin-for-blocks-and-widgets all);
    }
}

.widget {
    clear: both;
    .block-title {
        &:extend(.abs-block-title all);
    }
}

}

//
//    Desktop
//--------------------------------------
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {

    html,
    body {
        height: 100%; // stretch screen area for sticky footer
    }

    .page-wrapper {
        .lib-vendor-prefix-display(flex);
        .lib-vendor-prefix-flex-direction(column);
        min-height: 100%; // stretch content area for sticky footer
        > .breadcrumbs,
        > .top-container,
        > .widget {
            width: 100%;
            box-sizing: border-box;
        }
        .ie10 &,
        .ie11 & {
            height: 100%;
        }
    }

    .navigation ul {
        padding: 0 8px;
    }

    .header {
        &.panel {
            > .header.links {
                float: right;
                font-size: 0;
                .lib-list-inline();
                > li {
                    font-size: @font-size__base;
                    margin: 0 0 0 15px;
                    &.welcome,
                    a {
                        line-height: 1.4;
                    }
                    &.welcome {
                        a {
                            .lib-css(padding-left, @indent__xs);
                        }
                    }
                }
                margin-left: auto;
            }
        }
        &.content {
            padding: @indent__l @indent__base 0;
            &:extend(.abs-add-clearfix-desktop all);
        }
    }

    .page-header {
        border: 0;
        margin-bottom: 0;
        .panel.wrapper {
            border-bottom: 1px solid @secondary__color;
        }
        .header.panel {
            padding-top: @indent__s;
            padding-bottom: @indent__s;
            &:extend(.abs-add-clearfix-desktop all);
        }
        .switcher {
            display: inline-block;
        }
    }

    .page-main {
        > .page-title-wrapper {
            .page-title {
                display: inline-block;
            }
            .page-title + .action {
                float: right;
                margin-top: @indent__base;
            }
        }
    }

    .logo {
        margin: -8px auto 25px 0;
        img {
            max-height: inherit;
        }
    }

    .footer {
        &.content {
            .block {
                float: right;
            }
            .links {
                display: inline-block;
                vertical-align: top;
                margin-bottom: 20px;
                padding: 0 50px 0 0;
            }
            .switcher.store {
                display: inline-block;
                padding-right: 50px;
                vertical-align: top;
            }
        }
        .copyright {
            &:extend(.abs-add-clearfix all);
        }
    }
}

//
//    Common
//--------------------------------------

& when (@media-common = true) {

.no-display {
    &:extend(.abs-no-display all);
}

// Calendar
.ui-datepicker td {
    padding: 0;
}

}
